<template>
  <div class="day-count" v-if="dayDaka">
    <div class="card border-bottom-last" v-if="dayDaka.first_time">
      <div class="work">
        <div class="work-time">
          <span class="time">上班时间</span>
          <span class="time-des">{{dayDaka.first_time*1000 | dateFmt('MM月DD HH:mm')}}</span>
        </div> 
        <div class="work-address">
          <span class="address">打卡地点</span>
          <span class="time-des">{{dayDaka.first_address}}</span>
        </div> 
      </div>
    </div>
    <div class="card border-bottom-last" v-if="dayDaka.second_time">
      <div class="work">
        <div class="work-time">
          <span class="time">下班时间</span>
          <span class="time-des">{{dayDaka.second_time*1000 | dateFmt('MM月DD HH:mm')}}</span>
        </div> 
        <div class="work-address">
          <span class="address">打卡地点</span>
          <span class="time-des">{{dayDaka.second_address}}</span>
        </div> 
      </div>
    </div>
    <div class="card border-bottom-last" v-if="dayDaka.third_time">
      <div class="work">
        <div class="work-time">
          <span class="time">上班时间</span>
          <span class="time-des">{{dayDaka.third_time*1000 | dateFmt('MM月DD HH:mm')}}</span>
        </div> 
        <div class="work-address">
          <span class="address">打卡地点</span>
          <span class="time-des">{{dayDaka.third_address}}</span>
        </div> 
      </div>
    </div>
    <div class="card border-bottom-last" v-if="dayDaka.fourth_time">
      <div class="work">
        <div class="work-time">
          <span class="time">下班时间</span>
          <span class="time-des">{{dayDaka.fourth_time*1000 | dateFmt('MM月DD HH:mm')}}</span>
        </div> 
        <div class="work-address">
          <span class="address">打卡地点</span>
          <span class="time-des">{{dayDaka.fourth_address}}</span>
        </div> 
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: []
    }
  },
  props: ['dayDaka']
}
</script>

<style lang="scss">
  .day-count{
    .card {
      margin: 0 10px;        
      .work {
        padding: 10px 0;
        .work-time,.work-address{
          display: flex;
          line-height: 16px;     
        }
        .time-des {
          flex: 1
        }
        .time,.address {
          width: 60px;
          color:rgb(102,102,102);
        }
      }
    }
  }
</style>
